package com.lxz.bookmanager.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "book_info")
public class Book {
    @TableField(value = "id")
    private Integer id;

    @TableField(value = "book_id")
    private Long bookId;

    @TableField(value = "name")
    private String name;

    @TableField(value = "author")
    private String author;

    @TableField(value = "publish")
    private String publish;

    @TableField(value = "isbn")
    private String isbn;

    @TableField(value = "introduction")
    private String introduction;

    @TableField(value = "language")
    private String language;

    @TableField(value = "price")
    private BigDecimal price;

    @TableField(value = "pubdate")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date pubdate;

    @TableField(value = "class_id")
    private int classId; //分类号

    @TableField(value = "pressmark")
    private int pressmark; //书架号

    @TableField(value = "state")
    private int state;

    
}
